/* Popup Styles */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 380px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  background: #ffffff;
}

/* Container */
.popup-container {
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

/* Header */
.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6366f1;
}

.logo h1 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

/* Content */
.popup-content {
  flex: 1;
  overflow-y: auto;
}

/* Recording Section */
.recording-section {
  padding: 24px 20px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 20px;
  font-size: 13px;
  color: #6b7280;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #6b7280;
  border-radius: 50%;
}

.status-indicator.recording .status-dot {
  background: #dc2626;
  animation: pulse 2s infinite;
}

.status-indicator.recording .status-text {
  color: #dc2626;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.help-text {
  margin-top: 12px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

/* Recordings Section */
.recordings-section {
  padding: 20px 20px 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

/* Recordings List */
.recordings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recording-item {
  display: flex;
  align-items: start;
  gap: 12px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.recording-item:hover {
  border-color: #6366f1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.recording-icon {
  width: 40px;
  height: 40px;
  background: #e0e7ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  flex-shrink: 0;
}

.recording-info {
  flex: 1;
  min-width: 0;
}

.recording-title {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recording-meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recording-actions {
  display: flex;
  gap: 4px;
}

/* Empty State */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #9ca3af;
}

.empty-state svg {
  margin: 0 auto 16px;
}

.empty-state p {
  margin: 4px 0;
}

.text-muted {
  font-size: 13px;
  color: #9ca3af;
}

/* Footer */
.popup-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 12px;
  color: #6b7280;
}

.footer-link {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #6366f1;
}

.separator {
  color: #d1d5db;
}

.version {
  color: #9ca3af;
}

/* Buttons */
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary-btn:hover {
  background: #4f46e5;
}

.primary-btn:active {
  transform: scale(0.98);
}

.primary-btn.stop {
  background: #dc2626;
}

.primary-btn.stop:hover {
  background: #b91c1c;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: white;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  color: #6b7280;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: #f3f4f6;
  color: #4b5563;
}

.text-btn {
  padding: 0;
  background: transparent;
  color: #6366f1;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.text-btn:hover {
  color: #4f46e5;
}

/* Settings Panel */
.settings-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.settings-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.settings-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.setting-item {
  margin-bottom: 20px;
}

.setting-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.setting-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.setting-item input[type="number"],
.setting-item input[type="color"],
.setting-item select {
  margin-top: 8px;
  padding: 8px 12px;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
}

.setting-item input[type="color"] {
  height: 40px;
  cursor: pointer;
}

.settings-footer {
  display: flex;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.settings-footer .secondary-btn,
.settings-footer .primary-btn {
  flex: 1;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
